package com.example.stu1.teacher.controller;


import com.example.stu1.score.service.ScoreService;
import com.example.stu1.teacher.pojo.Teacher;
import com.example.stu1.teacher.service.TeacherService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;

@RestController
@RequestMapping("/teacher")
public class TeacherController {
    @Resource
    private TeacherService service;

    @RequestMapping("/query")
    public Teacher query(Integer tno) {
        return service.query(tno);
    }

    @RequestMapping("/update")
    public void update(Teacher teacher) {
        service.update(teacher);
    }

}
